#include "loginfirst.h"
#include "ui_loginfirst.h"
#include <QMessageBox>
#include "formdetail.h"
#include "select.h"
#include "memory.h"


LoginFirst::LoginFirst(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::LoginFirst)
{
    ui->setupUi(this);
}

LoginFirst::~LoginFirst()
{
    delete ui;
}

//退出按钮；
void LoginFirst::on_pushButton_2_clicked()
{
    QMessageBox judge;
    judge.setStyleSheet("QLabel{""min-width:200px;""min-height:80px;"
                        "font-size:20px;""}");
    judge.setText("   请确认该操作！");
    judge.setStandardButtons(QMessageBox::Yes|QMessageBox::No);
    judge.setDefaultButton(QMessageBox::No);

    int res=judge.exec();
    if(res==QMessageBox::Yes)
    {
        this->close();
    }
}

//打开详细信息界面；
void LoginFirst::on_pushButton_3_clicked()
{
    fd = new FormDetail;
    fd->show();
}

//打开选择界面；
void LoginFirst::on_pushButton1_clicked()
{
    s = new Select;
    s->show();
}

//打开历史记录；
void LoginFirst::on_pushButton_clicked()
{
    my = new Memory;
    my->show();
}


